package com.example.order.controller;

import com.example.order.dao.BrandDAO;
import com.example.order.dao.OdersDAO;
import com.example.order.entity.BrandEntity;
import com.example.order.entity.OdersEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api("商品相关")
public class BrandController {
    @Autowired
    BrandDAO brandDAO;

    @ApiOperation("查询商品")
    @GetMapping("/getbrand")
    public List<BrandEntity> getBrands(){

        return  brandDAO.getBrand();
    }
}
